﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true"
    CodeFile="AddMovieScreenShots.aspx.cs" Inherits="Admin_Default2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="top-bar select-bar">
        <a href="AddMovie.aspx" class="button">Add Movie</a> <a href="AddMovieLink.aspx"
            class="button">Add Link</a>
        <h1>
            <b>Add Movie Screen </b>
        </h1>
        <asp:Label ID="lblmsg" Font-Bold="true" Width="100%" runat="server" BackColor="Red"
            ForeColor="White" EnableTheming="False"></asp:Label>
    </div>
    <br />
    <div >
        <table width="120%" cellpadding="3px">
            <tr>
                <td>
                    <asp:Label ID="lblSubCategory" Font-Bold="true" runat="server" Text="Select Movie Category: "></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlSubCategory" runat="server" Width="100%" 
                        AutoPostBack="True" 
                        onselectedindexchanged="ddlSubCategory_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
                
                  <td>
                    <asp:Label ID="lblMovie" Font-Bold="true" runat="server" Text="Select Movie: "></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlMovie" AutoPostBack="true" runat="server" Width="120%" 
                        onselectedindexchanged="ddlMovie_SelectedIndexChanged">
                        <asp:ListItem Text="------Select Movie------" Value="0"></asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            
            <tr>
                <td>
                    <asp:Label ID="lblMovieScreen" Font-Bold="true" runat="server" Text="Movie Screen: "></asp:Label>
                </td>
                <td colspan="3">
                <asp:TextBox ID="txtScreenPath" runat="server" Width="120%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                
                <td align="right" colspan="4" >
                    <asp:Button ID="btnAddScreen" Width="15%" Font-Bold="true" OnClientClick="return ValidateMovieScreenShots('ddlSubCategory','ddlMovie','txtScreenPath')"
                        Text="Add" runat="server" onclick="btnAddScreen_Click" />
                </td>
            </tr>
        </table>
    </div>
    <br />
    <div >
        <asp:GridView ID="grdScreen" runat="server" Width="100%" AutoGenerateColumns="false" ShowHeader="true">
            <Columns>
                <asp:TemplateField HeaderText="ID">
                    <ItemTemplate>
                        <asp:Label ID="lblScreenID" Text='<%# DataBinder.Eval(Container.DataItem,"ScreenID")%>' runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Movie Screen">
                    <ItemTemplate>
                    <asp:Image ID="imgScreen" style="height: 100px; width: 200px;" runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem,"ScreenPath")%>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:CommandField ShowEditButton="True" EditImageUrl="~/Admin/img/edit-icon.gif"
                    ButtonType="Image" />
            </Columns>
            <AlternatingRowStyle BackColor="ButtonShadow" />
            <HeaderStyle BackColor="SpringGreen" />
        </asp:GridView>
    </div>
</asp:Content>
